package com.project.web.order.service.app;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.project.web.course.service.common.BaseService;
import com.project.web.order.model.app.MbrOrder;
import com.project.web.order.model.app.vo.MbrOrderInfoVO;
import com.project.web.order.model.app.vo.MbrOrderPayVO;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 会员订单业务接口
 *
 * @Author: wyy
 * @Date: 2021-02-02 01:19
 */
public interface MbrOrderService extends BaseService<MbrOrder, Long> {

    /**
     * 分页查询订单
     *
     * @param courseOrder
     * @param page
     * @return
     */
    PageInfo<MbrOrder> getPageList(MbrOrder courseOrder, Page page);

    /**
     * App统一下单
     *
     * @param mbrOrderPayVO 会员订单支付VO对象
     * @param httpRequest   request请求对象
     * @return
     */
    Map<String, Object> handleMbrOrderOfApp(MbrOrderPayVO mbrOrderPayVO, HttpServletRequest httpRequest);

    /**
     * 小程序商品统一下单
     *
     * @param mbrOrderPayVO 会员订单支付VO对象
     * @param httpRequest   request请求对象
     * @return
     */
    Map<String, Object> handleMbrOrderOfMiniProduct(MbrOrderPayVO mbrOrderPayVO, HttpServletRequest httpRequest);

    /**
     * @param orderNo       原始订单号
     * @param transactionNo 三方订单号订单号
     * @param payDate       支付成功实践
     */
    void handleNotifyOfPay(String orderNo, String transactionNo, Date payDate);

    /**
     * 会员订单统一下【公众号支付】
     *
     * @param mbrOrderPayVO 会员订单支付VO对象
     * @param request       request请求对象
     * @return
     */
    Map<String, Object> handleUnifiedOfMp(MbrOrderPayVO mbrOrderPayVO, HttpServletRequest request);

    /**
     * 查询App个人中心--我的订单
     *
     * @param mbrOrder 会员订单对象
     * @return
     */
    List<MbrOrderInfoVO> getOrdersOfPersonalCenter(MbrOrder mbrOrder);
}
